import { defHttp } from '/@/utils/http/axios';
var Api;
(function (Api) {
    Api["list"] = "/sys/gatewayRoute/list";
    Api["save"] = "/sys/gatewayRoute/add";
    Api["edit"] = "/sys/gatewayRoute/updateAll";
    Api["delete"] = "/sys/gatewayRoute/delete";
})(Api || (Api = {}));
/**
 * 查询路由列表
 * @param params
 */
export const getRouteList = (params) => {
    return defHttp.get({ url: Api.list, params });
};
/**
 * 保存或者更新路由
 * @param params
 */
export const saveOrUpdateRoute = (params) => {
    return defHttp.post({ url: Api.edit, params });
};
/**
 * 删除路由
 * @param params
 */
export const deleteRoute = (params, handleSuccess) => {
    return defHttp.delete({ url: Api.delete, data: params }, { joinParamsToUrl: true }).then(() => {
        handleSuccess();
    });
};
